package common

import (
	"fmt"
	"strconv"
)

//保留两位小数
func FriendlyFloat64(fv float64) float64 {
	val, err := strconv.ParseFloat(fmt.Sprintf("%.2f", fv), 64)
	if err != nil {
		return fv
	}
	return val
}
